package com.attendance.www.hr.service;

import com.attendance.www.hr.beans.UserBean;
import com.attendance.www.hr.beans.UserEmployeeBean;
import com.attendance.www.hr.entitys.User;

public interface IUserService {

	/**
	 * 用户登录
	 * @param loginName 账号
	 * @param passWord 密码
	 * @return
	 */
	public Integer login(UserBean userBean);
	
	public UserEmployeeBean getUserEmployee(Integer userId,String ip);
	
	public User validateUser(UserBean userBean);
	
	public void updateUserPassWord(User user);
	
	public boolean getVerificationPassword(UserBean userBean);
	
	public boolean forgetPassword(String mail);
	
	/**
	 * 验证链接是否有效(key)
	 * @param key
	 * @return 0密码，1审批 有效，null 无效
	 */
	public Integer checkKey(String key);
	
	/**
	 * 获取登陆人userid
	 * @param key
	 * @return
	 */
	public Integer getUserId(String key);
	
	/**
	 * 邮件重置密码
	 * @param newPasswd1
	 * @param newPasswd2
	 * @return
	 */
	public boolean doResetPassword(String newPasswd, String key);
	
	/**
	 * 登录
	 * @param userBean
	 * @return
	 */
	public Integer getUserByUserBean(UserBean userBean);
}
